<?php
// include_once FUN_PTH.'plugin.inc.php';

// $plugin_list = get_plugins();
// $vars['list'] = array_slice($plugin_list, 1);

$_GET['state'] = isset($_GET['state']) ? trim($_GET['state']) : '';
$oPlugin = new Plugin();
$plugin_list = $oPlugin->get_all('*', $_GET, $order = array());
$plugin_all = array();
foreach($plugin_list['list'] as $plugin){
	$plugin['filters'] = json_decode($plugin['filters']);
	if($plugin['filters'])$plugin['filters'] = std_class_object_to_array($plugin['filters']);
	$plugin['actions'] = json_decode($plugin['actions']);
	if($plugin['actions'])$plugin['actions'] = std_class_object_to_array($plugin['actions']);
	$plugin_all[] = $plugin;
}
$vars['list'] = $plugin_all;
$vars['total'] = count($plugin_list['list']);

// 搜索
$vars['state_options'] = make_options(array('未启用', '启用'), true, $_GET['state']);
?>